package cn.com.scitc.licenseplateback.model;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "DetailsOfCharges", schema = "CubeLibrary", catalog = "")
public class DetailsOfChargesEntity {
    private int member;
    private double price;
    private int waitFor;
    private double bookingFee;

    @Id
    @Column(name = "Member", nullable = false)
    public int getMember() {
        return member;
    }

    public void setMember(int member) {
        this.member = member;
    }

    @Basic
    @Column(name = "Price", nullable = false, precision = 0)
    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    @Basic
    @Column(name = "WaitFor", nullable = false)
    public int getWaitFor() {
        return waitFor;
    }

    public void setWaitFor(int waitFor) {
        this.waitFor = waitFor;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DetailsOfChargesEntity that = (DetailsOfChargesEntity) o;
        return member == that.member &&
                Double.compare(that.price, price) == 0 &&
                waitFor == that.waitFor;
    }

    @Override
    public int hashCode() {
        return Objects.hash(member, price, waitFor);
    }

    @Basic
    @Column(name = "BookingFee", nullable = false, precision = 0)
    public double getBookingFee() {
        return bookingFee;
    }

    public void setBookingFee(double bookingFee) {
        this.bookingFee = bookingFee;
    }
}
